package com.neusoft.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.neusoft.service.VacationService;
@Component
public class vacationTask {
	
	@Autowired
	private VacationService cs;
	
	@Scheduled(cron = "0 0 0 1 1 ?")  //每年1月1日起给付新年度年假
	public void task1() {
		cs.upvacation();
	}
	
	@Scheduled(cron = "0 0 0 1 3 ?")  //每年3月1日起清除前年年假
	public void task2() {

		cs.delvacation();
	}
}
